<!-- form表单视图 -->
<div style="margin-top:30px">
    <form class="form-horizontal common-form" id="form-save" method="post" action="/auth/rule/save" onsubmit="return false;" autocomplete="off">
    <input type=hidden value="{{$row['id'] ?? 0}}" name="id" id="id">

        <div class="form-group row form-item">
            <label style=" font-weight: normal" for="c-mch_name" class="control-label col-xs-12 col-sm-2">菜单：</label>
            <div class="col-xs-12 col-sm-10">
                <div class="row radios">
                    <div style="display: inline-block;padding-top: 5px;padding-left: 0" class="col-sm-6">
                        @component('component/radio',['radio'=>[ONE=>'是',ZERO=>'否'],'name'=>'is_menu','default_key'=>$row['is_menu']??ONE])
                        @endcomponent
                    </div>
                    <span class="col-sm-5 color-6A6969"> 是：正常现在左侧菜单使用；否：不能在左侧菜单显示</span>
                </div>

                <span class="msg-box" style="position:static;" for="cms_auth_rule_ismenu"></span>
            </div>
        </div>
        <div class="form-group row form-item">
            <label style=" font-weight: normal" for="c-mch_name" class="control-label col-xs-12 col-sm-2">父级：</label>
            <div class="col-xs-12 col-sm-10">
                <div class="row">
                    <select  class="form-control col-sm-6 mater-cate" id="rule_pid" name="rule_pid" >
                        <option value="0">无</option>
                        @foreach($treeList as $k=>$v)
                            <option value={{$k}} @if($k == ($row['rule_pid']??-1)) selected @endif >{!! $v !!}</option>
                        @endforeach
                    </select>
                    <span class="col-sm-5 color-6A6969"> 选择所属上级</span>
                </div>
                <span class="msg-box" style="position:static;" for="cms_auth_rule_pid"></span>
            </div>
        </div>
        <div class="form-group row form-item">
            <label style=" font-weight: normal" for="c-mch_name" class="control-label col-xs-12 col-sm-2">
            <span style="color:red">*</span> 规则：</label>
            <div class="col-xs-12 col-sm-10">
                <div class="row">
                    <input  id="rule_route" class="form-control col-sm-6" name="rule_route" type="text" value="{{$row['rule_route'] ??''}}" placeholder="" data-rule="规则名称:required">
                    <span class="col-sm-5 color-6A6969"> 填写路由名称如：auth/rule</span>
                </div>
                <span class="msg-box" style="position:static;" for="cms_auth_rule_name"></span>
            </div>
        </div>
        <div class="form-group row form-item">
            <label style=" font-weight: normal" for="c-mch_name" class="control-label col-xs-12 col-sm-2">
            <span style="color:red">*</span> 菜单名称：</label>
            <div class="col-xs-12 col-sm-10">
                <div class="row">
                    <input  id="rule_name" class="form-control col-sm-6" name="rule_name" type="text" value="{{$row['rule_name']??''}}" placeholder="" data-rule="规则名称:required">
                    <span class="col-sm-5 color-6A6969"> 中英文字符不能超过30个字符</span>
                </div>
                <span class="msg-box" style="position:static;" for="cms_auth_rule_title"></span>
            </div>
        </div>

        <div class="form-group row form-item">
            <label style=" font-weight: normal" for="c-mch_name" class="control-label col-xs-12 col-sm-2">权重：</label>
            <div class="col-xs-12 col-sm-10">
                <div class="row">
                    <input  id="sort" class="form-control col-sm-6" name="sort" type="text" value="{{$row['sort']??''}}">
                    <span class="col-sm-5 color-6A6969"> 菜单的排序前后，填写正整数</span>
                </div>
                <span class="msg-box" style="position:static;" for="cms_auth_rule_weigh"></span>
            </div>
        </div>
        <div class="form-group row form-item">
            <label style=" font-weight: normal" for="c-mch_name" class="control-label col-xs-12 col-sm-2">状态：</label>
            <div class="col-xs-12 col-sm-10">
                <div class="row radios">
                    <div style="display: inline-block;padding-top: 5px;padding-left: 0" class="col-sm-6">
                        @component('component/radio',['radio'=>[ONE=>'启用',ZERO=>'禁用'],'name'=>'status','default_key'=>$row['status']??ONE])
                        @endcomponent
                    </div>
                    <span class="col-sm-5 color-6A6969"> 启用：正常使用；禁用：无法正常启用</span>
                </div>

                <span class="msg-box" style="position:static;" for="cms_auth_rule_status"></span>
            </div>
        </div>
        <div class="form-group row form-item" >
            <label style=" font-weight: normal" for="c-mch_name" class="control-label col-xs-12 col-sm-2">备注提示：</label>
            @component('component/editor',['editor' => "tiny", 'rule_remark' => $row['rule_remark'] ?? ''])
            @endcomponent
        </div>

    </form>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-3F51B5 btn-sure btn-submit">确定</button>
            &nbsp;&nbsp;&nbsp;&nbsp;
            <button type="reset" class="btn btn-write btn-reset">重置</button>
        </div>
    </div>
</div>
<script src="{{ URL::asset('assets/tinymce/tinymce.min.js')}}"></script>
<script src="{{ URL::asset('assets/wang-editor/wangEditor.min.js')}}"></script>
<script src="/js/editor.js"></script>
<script>
    //调用编辑器
    tiny_editor("#rule_remark","100%",400);
    //wang_editor("#rule_remark")

</script>








